function init() {
    $("#myMaps").wayfinding({
	"maps": [
	    {"path": "http://c13818970.r70.cf2.rackcdn.com/demo/demo_map_1.svg", "id": "floor1"},
	    {"path": "http://c13818970.r70.cf2.rackcdn.com/demo/demo_map_2.svg", "id": "floor2"}
	],
	"path": {
	    width: 3,
	    color: "cyan",
	    radius: 8,
	    speed: 8
	},
	"startpoint": function() {
	    return "lcd.1";
	},
	"defaultMap": "floor1"
    });

    //make the three buttons clickable
    $("#controls button").click(function () {
	$("#myMaps").wayfinding("currentMap",$(this).attr("id"));
    });
    
    $("#controls #beginSelect").change(function () {
	$("#myMaps").wayfinding("startpoint", $(this).val());
	
	if ($("#controls .endSelect").val() !== "") {
	    $("#myMaps").wayfinding("routeTo", $("#controls #endSelect").val());
	}
    });
    
    $("#controls #endSelect").change(function () {
	$("#myMaps").wayfinding("routeTo", $(this).val());
    });
    
    $("#controls #accessible").change(function () {
	if ($("#controls #accessible:checked").val() !== undefined) {
	    $("#myMaps").wayfinding("accessibleRoute", true);
	}
	else {
	    $("#myMaps").wayfinding("accessibleRoute", false);
	}
	
	$("#myMaps").wayfinding("routeTo", $("#controls #endSelect").val());
    });

    $("#Rooms a").live("click", function () {
	$("#controls #endSelect option[value='" + $(this).attr("id") + "']").attr("selected", true);
    });
    
    readyEvent();
}